package helper;

import java.util.Random;

/** Menghasilkan nilai random untuk dadu
 */
public class RandomRange {

  public static int getRandomInteger()
  {
        Random aRandom = new Random();

        long fraction = (long)(6* aRandom.nextDouble());
        int randomNumber =  (int)(fraction + 1);

        return randomNumber ;
  }

  //MAIN
  public static void main(String[] args)
  {
        int x ;
        x = RandomRange.getRandomInteger();
        System.out.println("Random buat Dadu " +x);
    }

}